<?php

class Analytic extends CWidget {

    public function run() {
        $cs = Yii::app()->getClientScript();
        $script = Yii::t('app', 'google_analytic_script');
        if ( ! empty($script) ) {
            $cs->registerScript('google-analytic', $script, CClientScript::POS_END);
        }
    }
    
}